package com.rental.client;

import com.rental.common.result.AjaxResult;
import com.rental.model.vo.CosUploadVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient("file-server")
public interface CosFeignClient {

    @PostMapping(value = "/cos/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    AjaxResult<CosUploadVo> upload(@RequestPart("file") MultipartFile file, @RequestParam("path") String path);

}
